﻿<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<!-- 包含公共的JSP代码片段 -->
	
<title>餐馆王点菜系统</title>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="${applicationScope.frontStyleFolder}/js/jquery.js"></script>
<script type="text/javascript" src="${applicationScope.frontStyleFolder}/js/page_common.js"></script>
<link href="${applicationScope.frontStyleFolder}/css/common_style_blue.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="${applicationScope.frontStyleFolder}/css/index_1.css" />
<link href="${applicationScope.frontStyleFolder}/css/index.css" rel="stylesheet" type="text/css" />
</head>
<body style="text-align: center">
	<div id="all">
		<div id="menu">
			<!-- 显示菜品的div -->
			<div id="top">
				<ul>
					<!-- 循环列出餐品 -->
					<c:forEach items="${requestScope.pageFood.list}" var="food">
						<li>
							<dl>
								<dt>
									<a href="/menu?method=detail&foodId=${food.foodId}">
										<img width="214px" height="145px" src="${food.foodImage}" />
									</a>
								</dt>
								<dd class="f1">
									<a href="caixiangxi.jsp">${food.foodName}</a>
								</dd>
								<dd class="f2">
									<a href="caixiangxi.jsp">价格：&yen; ${food.foodPrice}</a>
								</dd>
								<dd class="f2">
									<a href="caixiangxi.jsp">会员价：&yen; ${food.foodVipPrice}</a>
								</dd>
							</dl>
						</li>
					</c:forEach>
				</ul>
			</div>
			
			<!-- 底部分页导航条div -->
			<div id="foot">

						<span style="float:left; line-height:53PX; margin-left:-50px; font-weight:bold; ">
							<a href="/menu?method=getPageFood&typeId=${requestScope.typeId}&foodName=${requestScope.foodName}&currentPage=${requestScope.pageFood.currentPage-1}"
							   style=" text-decoration:none;color:#000000; font-weight:bold">&lt;&lt;</a>
						</span>

				
				<div id="btn">
					<ul>
						<!-- 参看 百度, 谷歌是 左 5 右 4 -->
						<c:forEach begin="1" end="${requestScope.pageFood.totalPages}" var="page">
							<li><a <c:if test="${requestScope.pageFood.currentPage==page}">
								style="color: blue"</c:if>
								href="/menu?method=getPageFood&typeId=${requestScope.typeId}&foodName=${requestScope.foodName}&currentPage=${page}">${page}</a></li>
						</c:forEach>
					</ul>
				</div>
				
					
						<span style="float:right; line-height:53px; margin-right:10px;  ">
							<a  <%--<c:if test="${page==requestScope.pageFood.totalPages}"> disabled:disabled </c:if>--%>
							href="/menu?method=getPageFood&typeId=${requestScope.typeId}&foodName=${requestScope.foodName}&currentPage=${requestScope.pageFood.currentPage+1}"
							style="text-decoration:none;color:#000000; font-weight:bold">&gt;&gt;</a>
						</span>
					
					
				
			</div>
			
		</div>

		<!-- 右边菜系列表，菜品搜索框  -->
		<div id="dish_class">
			<div id="dish_top">
				<ul>

					<a href="/login?method=logout"><li class="dish_num" >退出</li></a>
					<li>
						<a href="#<%--clientOrderList.html--%>">
							<img src="${applicationScope.frontStyleFolder}/images/call2.gif" />
							<%--<li class="dish_num" ></li>--%>
						</a>
					</li>
				</ul>
			</div>

			<div id="dish_2">
				<ul>
					<c:forEach items="${sessionScope.types}" var="type">
						<li>
							<a href="/menu?method=getPageFood&typeId=${type.typeId}">${type.typeName}</a>
						</li>
					</c:forEach>
				</ul>
			</div>
			<div id="dish_3">
				<!-- 搜索菜品表单  -->
				<form action="/menu?method=getPageFood" method="post">
					<table width="166px">
						<tr>
							<td>
								<input type="text" id="dish_name" name="foodName" value="${requestScope.foodName}" class="select_value" placeholder="输入搜索菜品名" />
								<%--<input type="hidden" value="selectFood" name="method">--%>
							</td>
						</tr>
						<tr>
							<td><input type="submit" id="sub" value="" /></td>
						</tr>
						<tr>
							<td>
								<a href="/menu?method=getPageFood">
									<img src="${applicationScope.frontStyleFolder}/images/look.gif" />
								</a>
							</td>
						</tr>
					</table>
				</form>
			</div>
		</div>
		
	</div>
</body>
</html>
